/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2023. All rights reserved.
 */

package model

import "time"

/*
* CreditRecordId 记录号
* UserId 用户ID
* CloudUserId 云上用户ID
* OperatorId 操作者ID
* OperationType 操作类型充值1退款2
* OperationTime 操作时间
* Currency 币种,CNY
* Amount 操作金额
* ExpireTime 失效时间
 */

type CreditRecord struct {
	CreditRecordId string    `orm:"column(credit_record_id);size(64);index;pk;"`
	UserId         string    `orm:"column(user_id);size(64);"`
	CloudUserId    string    `orm:"column(cloud_user_id);size(64);"`
	OperatorId     string    `orm:"column(operator_id);size(64);"`
	OperationType  int       `orm:"column(operation_type);type(int);"`
	OperationTime  time.Time `orm:"column(operation_time);auto_now_add;size(datetime)"`
	Currency       string    `orm:"column(currency);size(10)"`
	Amount         float64   `orm:"column(amount);digits(17);decimals(2)"`
	ExpireTime     time.Time `orm:"column(expire_time);size(datetime)"`
}
